import StockStore


class Gadfly:
    def __init__(self, cycle, block=None, stock=None, path=None):
        if param == None:
            self.TdxPath = param
        else:
            config = units.loadYaml('config.yaml')
            platform = units.checkPlatform()
            if platform == 'Windows':
                self.TdxPath = config.stock_source.tdx.win_path
            elif platform in ['MacOS', 'Linux', 'Windows Subsystem for Linux (WSL)']:
                self.TdxPath = config.stock_source.tdx.mac_path
            else:
                pass
        self.cycle =StockStore.get_stock_cycle(cycle)
        if block is not None:
            self.stock = StockStore.get_stock_block(block['name'], block['type'])

    def addStrategy(self):
        pass

    def addAnalyzers(self):
        pass

    def addData(self):
        pass

    def building(self):
        pass

    def run(self):
        pass